home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / shmem_quiet.z / shmem_quiet
Encoding:
Text File  |  2002-10-03  |  4.3 KB  |  72 lines

  1.  
  2. SHMEM_QUIET(3)                                               SHMEM_QUIET(3)
  3.  
  4.  
  5. NNNNAAAAMMMMEEEE
  6.      sssshhhhmmmmeeeemmmm____qqqquuuuiiiieeeetttt - Waits for completion of all outstanding remote writes
  7.      issued by a processing element (PE)
  8.  
  9. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  10.      C or C++:
  11.  
  12.         ####iiiinnnncccclllluuuuddddeeee <<<<mmmmpppppppp////sssshhhhmmmmeeeemmmm....hhhh>>>>
  13.  
  14.         vvvvooooiiiidddd sssshhhhmmmmeeeemmmm____qqqquuuuiiiieeeetttt((((vvvvooooiiiidddd))));;;;
  15.  
  16.      Fortran:
  17.  
  18.         CCCCAAAALLLLLLLL SSSSHHHHMMMMEEEEMMMM____QQQQUUUUIIIIEEEETTTT
  19.  
  20. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  21.      sssshhhhmmmmeeeemmmm____qqqquuuuiiiieeeetttt ensures ordering of put (remote write) operations.  All
  22.      put operations issued to any processing element (PE) prior to the call
  23.      to sssshhhhmmmmeeeemmmm____qqqquuuuiiiieeeetttt are guaranteed to be visible to all other PEs no later
  24.      than any subsequent memory load or store, remote put or get, or
  25.      synchronization operations that follow the call to sssshhhhmmmmeeeemmmm____qqqquuuuiiiieeeetttt.
  26.  
  27. NNNNOOOOTTTTEEEESSSS
  28.      sssshhhhmmmmeeeemmmm____qqqquuuuiiiieeeetttt is an inlined macro in C/C++.  To get the function form,
  29.      the sssshhhhmmmmeeeemmmm____qqqquuuuiiiieeeetttt macro name must be undefined by use of the ####uuuunnnnddddeeeeffff
  30.      sssshhhhmmmmeeeemmmm____qqqquuuuiiiieeeetttt ccccpppppppp(1) directive.
  31.  
  32.      sssshhhhmmmmeeeemmmm____qqqquuuuiiiieeeetttt is most useful as a way of ensuring ordering of delivery
  33.      of several ppppuuuutttt operations.  For example, you might use sssshhhhmmmmeeeemmmm____qqqquuuuiiiieeeetttt to
  34.      await delivery of a block of data before issuing another ppppuuuutttt, which
  35.      sets a completion flag on another PE.
  36.  
  37.      sssshhhhmmmmeeeemmmm____qqqquuuuiiiieeeetttt is not usually needed if sssshhhhmmmmeeeemmmm____bbbbaaaarrrrrrrriiiieeeerrrr____aaaallllllll(3) or
  38.      sssshhhhmmmmeeeemmmm____bbbbaaaarrrrrrrriiiieeeerrrr(3) are called.  The barrier routines all wait for the
  39.      completion of outstanding remote writes (ppppuuuutttts).
  40.  
  41. EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  42.      PROGRAM COMPFLAG
  43.      INTEGER FLAG_VAR, ARRAY(100), RECEIVER, SENDER
  44.      COMMON/FLAG/FLAG_VAR
  45.      COMMON/DATA/ARRAY
  46.      INTRINSIC MY_PE
  47.  
  48.      FLAG_VAR = 0
  49.      CALL SHMEM_BARRIER_ALL          ! wait for FLAG_VAR to be initialized
  50.  
  51.      SENDER = 0                      ! PE 0 sends the data
  52.      RECEIVER = 1                    ! PE 1 receives the data
  53.      IF (MY_PE() .EQ. 0) THEN
  54.        ARRAY = 33
  55.        CALL SHMEM_PUT(ARRAY, ARRAY, 100, RECEIVER)   ! start sending data
  56.        CALL SHMEM_QUIET                              ! wait for delivery
  57.        CALL SHMEM_PUT(FLAG_VAR, 1, 1, RECEIVER)      ! send completion flag
  58.      ELSE IF (MY_PE() .EQ. RECEIVER) THEN
  59.        CALL SHMEM_UDCFLUSH
  60.        CALL SHMEM_WAIT(FLAG_VAR, 0)
  61.        PRINT*,ARRAY              ! ARRAY has been delivered
  62.      ENDIF
  63.      END
  64.  
  65. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  66.      iiiinnnnttttrrrroooo____sssshhhhmmmmeeeemmmm(3), sssshhhhmmmmeeeemmmm____bbbbaaaarrrrrrrriiiieeeerrrr(3), sssshhhhmmmmeeeemmmm____bbbbaaaarrrrrrrriiiieeeerrrr____aaaallllllll(3),
  67.      sssshhhhmmmmeeeemmmm____ffffeeeennnncccceeee(3), sssshhhhmmmmeeeemmmm____ppppuuuutttt(3), sssshhhhmmmmeeeemmmm____wwwwaaaaiiiitttt(3)
  68.  
  69.      ccccpppppppp(1)
  70.  
  71.      _M_e_s_s_a_g_e _P_a_s_s_i_n_g _T_o_o_l_k_i_t: _M_P_I _P_r_o_g_r_a_m_m_e_r'_s _M_a_n_u_a_l
  72.